<!DOCTYPE html>
<html lang="en">
  <head>
    <meta charset="UTF-8">
    <title>Title</title>
    
    <style>
      .card {
        border: 1px gray solid;
        border-radius: 10px;
        padding: 15px;
      }
      
      .card-title {
        font-size: 15px;
        font-weight: bold;
        margin: 10px;
      }
      
      .card-body > div {
        color: darkgray;
        background: pink;
        margin: 10px;
        width: 400px;
        height: 100px;
      }
    </style>
  </head>
  <body>
    <!--flex-flow属性是flex-direction和flex-wrap的结合体，同时设置主轴方向和flex项是否换行-->
    <div class="card">
      <div class="card-title">水平主轴 换行[flex-flow: row wrap]</div>
      <div class="card-body" style="display: flex;flex-flow: row wrap">
        <div>1</div>
        <div>2</div>
        <div>3</div>
        <div>4</div>
        <div>5</div>
        <div>6</div>
      </div>
    </div>
    <br>
    <div class="card">
      <div class="card-title">反向水平主轴 反向并换行[flex-flow: row-reverse wrap-reverse]</div>
      <div class="card-body" style="display: flex;flex-flow: row-reverse wrap-reverse">
        <div>1</div>
        <div>2</div>
        <div>3</div>
        <div>4</div>
        <div>5</div>
        <div>6</div>
      </div>
    </div>
  </body>
</html>